<template>
  <ul class="todo-main">
    <transition-group appear
      name="animate__animated animate__bounce animate__delay-2s"
      enter-active-class="animate__backInRight"
      leave-active-class="animate__backOutLeft"
    >
      <ItemView
        v-for="todo in todoList"
        :key="todo.id" 
        :info="todo" 
      />
    </transition-group>
  </ul>
</template>

<script>
import 'animate.css'
import ItemView from './ItemView.vue'
export default {
    name: 'ListView',
    components: { ItemView },
    props: ['todoList', 'onCheck', 'onDeleteById']
}
</script>

<style lang="less" scoped>
/*main*/
.todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}
</style>>